/**
 * Generate time : 2011-05-19 16:54:26
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.ce.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCEA8 table comment : 设备变量数据记录
 */
public class ZMCEA8 extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdProductionUnitsId = " "; /* 生产单元ID */
	private String fdVariableId = " "; /* 变量ID */
	private String fdVariableValue = " "; /* 数据值 */
	private String fdRecordClock = " "; /* 记录时刻 */

	private String fdProductionUnitNo = " "; /* 生产单元编号 */
	private String fdProductionUnitName = " "; /* 生产单元名称 */
	private String fdVariableName = " "; /* 变量名称 */
	private String fdVariableUnit = " "; /* 单位 */

	private String fdMaxValue = " "; /* 最大值 */
	private String fdMaxRecordtime = " "; /* 最大值记录时刻 */
	private String fdMinValue = " "; /* 最小值 */
	private String fdMinRecordtime = " "; /* 最小值记录时刻 */
	private String fdAvgValue = " "; /* 平均值 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProductionUnitsId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("生产单元ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdVariableId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("变量ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdVariableValue");
		eiColumn.setFieldLength(16);
		eiColumn.setDescName("数据值");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRecordClock");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("记录时刻");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProductionUnitNo");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("生产单元编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProductionUnitName");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("生产单元名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdVariableName");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("变量名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdVariableUnit");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("单位");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaxValue");
		eiColumn.setFieldLength(16);
		eiColumn.setDescName("数据最大值");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaxRecordtime");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("最大值记录时刻");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMinValue");
		eiColumn.setFieldLength(16);
		eiColumn.setDescName("数据最小值");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMinRecordtime");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("最小值记录时刻");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdAvgValue");
		eiColumn.setFieldLength(16);
		eiColumn.setDescName("数据平均值");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCEA8() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdProductionUnitsId - 生产单元ID
	 * 
	 * @return the fdProductionUnitsId
	 */
	public String getFdProductionUnitsId() {
		return this.fdProductionUnitsId;
	}

	/**
	 * set the fdProductionUnitsId - 生产单元ID
	 */
	public void setFdProductionUnitsId(String fdProductionUnitsId) {
		this.fdProductionUnitsId = fdProductionUnitsId;
	}

	/**
	 * get the fdVariableId - 变量ID
	 * 
	 * @return the fdVariableId
	 */
	public String getFdVariableId() {
		return this.fdVariableId;
	}

	/**
	 * set the fdVariableId - 变量ID
	 */
	public void setFdVariableId(String fdVariableId) {
		this.fdVariableId = fdVariableId;
	}

	/**
	 * get the fdVariableValue - 数据值
	 * 
	 * @return the fdVariableValue
	 */
	public String getFdVariableValue() {
		return this.fdVariableValue;
	}

	/**
	 * set the fdVariableValue - 数据值
	 */
	public void setFdVariableValue(String fdVariableValue) {
		this.fdVariableValue = fdVariableValue;
	}

	/**
	 * get the fdRecordClock - 记录时刻
	 * 
	 * @return the fdRecordClock
	 */
	public String getFdRecordClock() {
		return this.fdRecordClock;
	}

	/**
	 * set the fdRecordClock - 记录时刻
	 */
	public void setFdRecordClock(String fdRecordClock) {
		this.fdRecordClock = fdRecordClock;
	}

	/**
	 * get the fdProductionUnitNo - 生产单元编号
	 * 
	 * @return the fdProductionUnitNo
	 */
	public String getFdProductionUnitNo() {
		return this.fdProductionUnitNo;
	}

	/**
	 * set the fdProductionUnitNo - 生产单元编号
	 */
	public void setFdProductionUnitNo(String fdProductionUnitNo) {
		this.fdProductionUnitNo = fdProductionUnitNo;
	}

	/**
	 * get the fdProductionUnitName - 生产单元名称
	 * 
	 * @return the fdProductionUnitName
	 */
	public String getFdProductionUnitName() {
		return this.fdProductionUnitName;
	}

	/**
	 * set the fdProductionUnitName - 生产单元名称
	 */
	public void setFdProductionUnitName(String fdProductionUnitName) {
		this.fdProductionUnitName = fdProductionUnitName;
	}

	/**
	 * get the fdVariableName - 变量名称
	 * 
	 * @return the fdVariableName
	 */
	public String getFdVariableName() {
		return this.fdVariableName;
	}

	/**
	 * set the fdVariableName - 变量名称
	 */
	public void setFdVariableName(String fdVariableName) {
		this.fdVariableName = fdVariableName;
	}

	/**
	 * get the fdVariableUnit - 单位
	 * 
	 * @return the fdVariableUnit
	 */
	public String getFdVariableUnit() {
		return this.fdVariableUnit;
	}

	/**
	 * set the fdVariableUnit - 单位
	 */
	public void setFdVariableUnit(String fdVariableUnit) {
		this.fdVariableUnit = fdVariableUnit;
	}

	/**
	 * get the fdMaxValue - 最大条目值
	 * 
	 * @return the fdMaxValue
	 */
	public String getFdMaxValue() {
		return this.fdMaxValue;
	}

	/**
	 * set the fdMaxValue - 最大条目值
	 */
	public void setFdMaxValue(String fdMaxValue) {
		this.fdMaxValue = fdMaxValue;
	}

	/**
	 * get the fdMaxRecordtime - 最大值记录时刻
	 * 
	 * @return the fdMaxRecordtime
	 */
	public String getFdMaxRecordtime() {
		return this.fdMaxRecordtime;
	}

	/**
	 * set the fdMaxRecordtime - 最大值记录时刻
	 */
	public void setFdMaxRecordtime(String fdMaxRecordtime) {
		this.fdMaxRecordtime = fdMaxRecordtime;
	}

	/**
	 * get the fdMinValue - 最小条目值
	 * 
	 * @return the fdMinValue
	 */
	public String getFdMinValue() {
		return this.fdMinValue;
	}

	/**
	 * set the fdMinValue - 最小条目值
	 */
	public void setFdMinValue(String fdMinValue) {
		this.fdMinValue = fdMinValue;
	}

	/**
	 * get the fdMinRecordtime - 最小值记录时刻
	 * 
	 * @return the fdMinRecordtime
	 */
	public String getFdMinRecordtime() {
		return this.fdMinRecordtime;
	}

	/**
	 * set the fdMinRecordtime - 最小值记录时刻
	 */
	public void setFdMinRecordtime(String fdMinRecordtime) {
		this.fdMinRecordtime = fdMinRecordtime;
	}

	/**
	 * get the fdAvgValue - 平均值
	 * 
	 * @return the fdAvgValue
	 */
	public String getFdAvgValue() {
		return this.fdAvgValue;
	}

	/**
	 * set the fdAvgValue - 平均值
	 */
	public void setFdAvgValue(String fdAvgValue) {
		this.fdAvgValue = fdAvgValue;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdProductionUnitsId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProductionUnitsId")), fdProductionUnitsId));
		setFdVariableId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdVariableId")), fdVariableId));
		setFdVariableValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdVariableValue")), fdVariableValue));
		setFdRecordClock(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRecordClock")), fdRecordClock));

		setFdProductionUnitNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProductionUnitNo")), fdProductionUnitNo));
		setFdProductionUnitName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProductionUnitName")), fdProductionUnitName));
		setFdVariableName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdVariableName")), fdVariableName));
		setFdVariableUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdVariableUnit")), fdVariableUnit));

		setFdMaxValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMaxValue")), fdMaxValue));
		setFdMaxRecordtime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMaxRecordtime")), fdMaxRecordtime));
		setFdMinValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMinValue")), fdMinValue));
		setFdMinRecordtime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMinRecordtime")), fdMinRecordtime));
		setFdAvgValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdAvgValue")), fdAvgValue));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdProductionUnitsId", StringUtils.toString(fdProductionUnitsId, eiMetadata.getMeta("fdProductionUnitsId")));
		map.put("fdVariableId", StringUtils.toString(fdVariableId, eiMetadata.getMeta("fdVariableId")));
		map.put("fdVariableValue", StringUtils.toString(fdVariableValue, eiMetadata.getMeta("fdVariableValue")));
		map.put("fdRecordClock", StringUtils.toString(fdRecordClock, eiMetadata.getMeta("fdRecordClock")));

		map.put("fdProductionUnitNo", StringUtils.toString(fdProductionUnitNo, eiMetadata.getMeta("fdProductionUnitNo")));
		map.put("fdProductionUnitName", StringUtils.toString(fdProductionUnitName, eiMetadata.getMeta("fdProductionUnitName")));
		map.put("fdVariableName", StringUtils.toString(fdVariableName, eiMetadata.getMeta("fdVariableName")));
		map.put("fdVariableUnit", StringUtils.toString(fdVariableUnit, eiMetadata.getMeta("fdVariableUnit")));

		map.put("fdMaxValue", StringUtils.toString(fdMaxValue, eiMetadata.getMeta("fdMaxValue")));
		map.put("fdMaxRecordtime", StringUtils.toString(fdMaxRecordtime, eiMetadata.getMeta("fdMaxRecordtime")));
		map.put("fdMinValue", StringUtils.toString(fdMinValue, eiMetadata.getMeta("fdMinValue")));
		map.put("fdMinRecordtime", StringUtils.toString(fdMinRecordtime, eiMetadata.getMeta("fdMinRecordtime")));
		map.put("fdAvgValue", StringUtils.toString(fdAvgValue, eiMetadata.getMeta("fdAvgValue")));

		return map;

	}
}